package com.tyk.bookstore.back.task.model.vo;

import com.tyk.bookstore.back.common.core.model.page.PageVo;
import com.tyk.bookstore.back.task.model.enume.TaskState;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author tyk
 * @description 定时任务
 */
@Data
@Schema(name = "TaskPageVo", description = "定时任务")
public class TaskPageVo extends PageVo<TaskPageVo.Task> {

    @Data
    @Schema(name = "Task", description = "定时任务")
    public static class Task implements Serializable {

        @Serial
        private static final long serialVersionUID = 1L;

        @Schema(description = "ID")
        private Long id;

        @Schema(description = "名称")
        private String name;

        @Schema(description = "模块")
        private String module;

        @Schema(description = "方法")
        private String method;

        @Schema(description = "Cron表达式")
        private String cron;

        @Schema(description = "描述")
        private String description;

        @Schema(description = "状态[0关闭,1开启]")
        private TaskState state;

        @Schema(description = "创建时间")
        private LocalDateTime createTime;

        @Schema(description = "更新时间")
        private LocalDateTime updateTime;

    }
}
